***Dataset restriction when including unmarried heterosexual partners

replace age=80 if age>80 & age!=. // Because ATUS top-codes at 80 in some years and 85 in other years
drop if holiday==1 // observation excluded if it falls on a holiday 
drop if age <18
drop if age >64
drop if native ==0 & yrimmig==0
drop if citizen ==3 // drops natives born abroad ~= 1,180 obs *added v6, 8/25/2017
drop if sp_female==female | um_female==female // dropping same sex couples

* Keeping only respondents that match to a partner
drop if sp_age==. & um_age==.

*Drop if out of age range
drop if (sp_age<18 & sp_age!=.) | (um_age<18 & um_age!=.)
drop if (sp_age>64 & sp_age!=.) | (um_age>64 & um_age!=.)

*Make the weight variable (each year to have equal weight)
egen sumwt=sum(wt06), by(year)
gen newwt=wt06/sumwt	
	
label var newwt "Adjusted ATUS Weight"
